package org.example.forum.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.forum.model.User;

@Mapper
public interface UserMapper {
    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    //@Param("username")表示为SQL传入的变量名，不写注解的话 String username（Java中的变量名）就是传入SQL的
    User selectByUserName(@Param("username") String username);
}